package com.itheima.mapper;


import com.itheima.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    @Select("select * from user")
    List<User> findAll();

    @Update("update user set username=#{username} where id=#{id}")
    void update(User user);

    @Select("select * from user where email=#{e}" )
    User findByEmail(@Param("e") String email);
}
